package fr.umlv.ig.main;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;

import fr.umlv.ig.xml.MetroModelFactory;
import fr.umlv.ig.model.MetroModelImpl;

public class Test {
	public static void main(String[] args) {
		MetroModelFactory metroFactory = null;
		try {
			metroFactory = MetroModelFactory.newInstance();
		} catch (ParserConfigurationException e) {
			System.err.println(e.getMessage());
			return;
		} catch (SAXException e) {
			System.err.println(e.getMessage());
			return;
		} catch (IOException e) {
			System.err.println(e.getMessage());
			return;
		}
		
		MetroModelImpl model = metroFactory.getMetroModelImpl();
		for(int i=0; i < model.getLine(1).getCountStation(); i++ ) {
			System.out.println(model.getStation(model.getLine(1), i ));
		}

		
	}
}
